package com.zkthink.ceres.product.dao;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.zkthink.base.mapper.SuperMapper;
import com.zkthink.ceres.product.entity.ProductImg;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 商品图片表
 * </p>
 *
 * @author JustArgo
 * @date 2020-05-03
 */
@Repository
public interface ProductImgMapper extends SuperMapper<ProductImg> {

    /** 根据id删除图片
     * @author JustArgo 2020/5/8 20:09
     * @return
     */
    int delProductImgById(Long id);

    /** 根据商品id，查询商品图片对象
     * @author JustArgo 2020/5/10 17:55
     * @return
     */
    @SqlParser(filter = true)
    List<ProductImg> selectByProductId(Long productId);

    /** 根据已有id，删除特定的商品图片
     * @author JustArgo 2020/5/29 20:03
     * @return
     */
    int delByProudctIdCondition(@Param("productId")Long productId, @Param("idList")List<Long> idList);
}
